const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
const webpack = require('webpack');

/**@type { import('webpack').Configuration } */
module.exports = {
  mode: 'none',
  stats: 'none',
  devtool: 'source-map',
  entry: path.resolve(__dirname, 'src/main.js'),
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: '[name].[hash].js',
  },
  devServer: {
    contentBase: path.resolve(__dirname),
    open: true,
    port: 3001,
    host: '127.0.0.1',
  },
  plugins: [new HtmlWebpackPlugin(), new webpack.HotModuleReplacementPlugin()],
};
